#include <cstdio>
#include <cstring>

int head[ 211 ], node[ 211 ], cost[ 211 ], next[ 211 ], e;
int n, t, s[ 111 ], as[ 111 ], m, c, a[ 111 ], f[ 111 ][ 501 ];
bool visit[ 111 ];

void addedge( int u, int v, int w )
{
    node[ e ] = v; cost[ e ] = w; next[ e ] = head[ u ]; head[ u ] = e++;
}

void dfs( int p, int step, int tt )
{
    int i, v;
    s[ step ] = p;
    if ( p == n )
    {
        m = step;
        for ( i = 0; i <= m; i++ )
            as[ i ] = s[ i ];
        t -= tt;
    }
    for ( i = head[ p ]; i != -1; i = next[ i ] )
    {
        v = node[ i ];
        if ( !visit[ v ] )
        {
            visit[ v ] = 1;
            dfs( v, step + 1, tt + cost[ i ] );
        }
    }
}

void init( )
{
    int i, j, u, v, w;
    e = 0;
    memset( head, -1, sizeof( head ) );
    for ( i = 0; i < n - 1; i++ )
    {
        scanf("%d%d%d", &u, &v, &w);
        addedge( u, v, w );
        addedge( v, u, w );
    }
    for ( i = 1; i <= n; i++ )
        scanf("%d", &a[ i ]);
    m = 0;
    memset( visit, 0, sizeof( visit ) );
    visit[ 1 ] = 1;
    dfs( 1, 0, 0 );
    c = 0;
    memset( visit, 0, sizeof( visit ) );
    for ( i = 0; i <= m; i++ )
    {
        c += a[ as[ i ] ];
        visit[ as[ i ] ] = 1;
    }
    memset( f, 0, sizeof( f ) );
}

void dfs2( int p, int dep, int tt )
{
    int i, j, v;
    for ( i = head[ p ]; i != -1; i = next[ i ] )
    {
        v = node[ i ];
        if ( visit[ v ] ) continue;
        visit[ v ] = true;
        if ( tt < 2 * cost[ i ] ) continue;
        for ( j = 0; j <= tt; j++ )
            f[ dep + 1 ][ j ] = f[ dep ][ j ];
        dfs2( v, dep + 1, tt - 2 * cost[ i ] );
        for ( j = 2 * cost[ i ]; j <= tt; j++ )
            if ( f[ dep ][ j ] < f[ dep + 1 ][ j - 2 * cost[ i ] ] + a[ v ] )
                f[ dep ][ j ] = f[ dep + 1 ][ j - 2 * cost[ i ] ] + a[ v ];
    }
}

void work( )
{
    int i, j, maxn = 0;
    if ( t < 0 )
    {
        puts("Human beings die in pursuit of wealth, and birds die in pursuit of food!");
        return ;
    }
    for ( i = 0; i <= m; i++ )
    {
        for ( j = 0; j <= t; j++ )
            f[ 1 ][ j ] = f[ 0 ][ j ];
        dfs2( as[ i ], 1, t );
        for ( j = 0; j <= t; j++ )
            if ( f[ 0 ][ j ] < f[ 1 ][ j ] )
                f[ 0 ][ j ] = f[ 1 ][ j ];
    }
    for ( i = 0; i <= t; i++ )
        if ( maxn < f[ 0 ][ i ] )
            maxn = f[ 0 ][ i ];
    printf("%d\n", c + maxn);
}

int main( )
{
    while ( scanf("%d%d", &n, &t) != EOF )
    {
        init( );
        work( );
    }
    return 0;
}
